﻿<!-- #include file="mymin.asp" -->
<%
Call Head()

w "<card title='文章详情'><p>"& systemMsgRoot

Dim id,ids,TP,fileId
TP=request("TP")
id=request("id")
if id="" or IsNumeric(id)=False then
	Call Error("ID无效！")
end if
ids=request("ids")

dim rs,rsFile
set rs=server.createobject("adodb.recordset")
rs.open "select * from 74hu_article where id="&id,myconn,1,1
if rs.eof then
	w "文章不存在<br/>"
else
	Counts=rs("smspin")
	w "["&fordate(rs("HU_date"))&"]<br/>"&nowml(rs("title"))&"<br/>"
	Content=rs("test")
	if request.querystring("o")<>1 then
		dim pagewordnum,startword,length,pageall,page,i
		pageWordNum=numArticle
		StartWord = 1
		Length=len(Content)
		PageAll=(Length+PageWordNum-1)\PageWordNum
		page=getN("page",1)
		i = page-1
		if isnull(i) or i="" then i=0

		dim ccc,sss
		ccc=instr(content,"||")
		if ccc>0 then
			sss=split(content,"||")
			PageAll=ubound(sss)+1
			if i>PageAll-1 then i=PageAll-1
			content = sss(i)
		else
			if clng(i)>int(PageAll) then i=PageAll-1
			Content = mid(Content,StartWord+i*PageWordNum,PageWordNum)
		end if
		w "-----------<br/>"
		if PageAll>1 then
			w "<a href='smsview.asp?id=" &  id & "&amp;ids="&ids&"&amp;p="&p&"&amp;o=1&amp;TP="&TP&"&amp;sid="&sid&"'>显示全文</a><br/>"
		end if
		w ubbcode(content)&"<br/>"& showPage("smsview.asp", "ids:"&ids&",id:"&id&",p:"&p&",TP:"&TP, page, PageAll)&""

	else
		w "-----------<br/><a href='smsview.asp?id=" &  id & "&amp;ids="&ids&"&amp;p="&p&"&amp;TP="&TP&"&amp;sid="&sid&"'>分页显示</a><br/>"&ubbcode(content)&"<br/>"
	end if
	fileId =rs("fileid")
	If fileId>0 Then
		Set rsFile=Server.CreateObject("ADODB.Recordset")
		rsFile.open "select top 1 url,buy,filesize,filetype from 74hu_download where id="&fileId,myconn,1,1
		If Not rsFile.eof Then
			w "-----------<br/><a href=""../../"&rsFile("url")&""">附件:(格式"&rsFile("filetype")&"/大小"&forFileSize(rsFile("filesize"))&"/"&rsFile("buy")&bbsMoney&")</a><br/>"
		End If
		rsFile.close
		Set rsFile=Nothing
	End If
end if

%>
----------<br/>
<a href="wzgl.asp?sid=<%=sid%>&amp;id=<%=id%>&amp;classid=<%=ids%>">[文章管理]</a><br/>
<a href="adminsmscl.asp?sid=<%=sid%>&amp;id=<%=ids%>">[文章列表]</a>
<br/><a href="wzclass.asp?sid=<%=sid%>">[返回分类]</a>
<%if TP<>"" then%>
<br/><a href="wzcl.asp?sid=<%=sid%>">[文章管理]</a>
<%end if
rs.close
set rs=nothing
Call Last
%>